Functions for Displaying File Previews
The following section describes four functions that let you display file previews.The Movie Toolbox provides two functions that allow you to display file previews in an Open dialog box in System 6 using standard file reply structures:
SFGetFilePreview
andSFPGetFilePreview
. The Movie Toolbox also supplies two new functions that allow you to display file previews in an Open dialog box in System 7 using standard file reply structures:StandardGetFilePreview
andCustomGetFilePreview
.
All of these functions take the same parameters as their existing counterparts with the addition of a
- The
SFGetFilePreview
function corresponds to the File Manager'sSFGetFile
routine. This function is the preferred function for creating a file preview and works with either System 7 or System 6.- The
SFPGetFilePreview
function corresponds to the File Manager'sSFPGetFile
routine.- The
StandardGetFilePreview
function corresponds to the File Manager'sStandardGetFile
routine.- The
CustomGetFilePreview
function corresponds to the File Manager'sCustomGetFile
routine. This function is available only in System 7.
where
parameter that allows you to specify the location of the upper-left corner of the dialog box. See Inside Macintosh: Files for information on theSFGetFile
,SFPGetFile
,StandardGetFile
, andCustomGetFile
routines.The
SFGetFilePreview
,SFPGetFilePreview
,StandardGetFilePreview
, andCustomGetFilePreview
functions allow the user to automatically convert files to movies if your application requests movies. If there is a file that can be converted into a movie file using a movie import component, then the file is shown in the Standard File dialog box in addition to any movies. When the user selects the file, the Open button changes to a Convert button. Figure 2-38 provides an example of this dialog box.Figure 2-41 Dialog box showing automatic file-to-movie conversion option
Choosing Convert displays a dialog box that allows the user to choose where the converted file should be saved. Figure 2-39 shows this dialog box.
Figure 2-42 Dialog box for saving a movie converted from a file
When conversion is complete, the converted file is returned to the calling application as the movie that the user chose. If you want to disable automatic file conversion in your application, you must write a file filter function and pass it to the file preview display function you are using. Your file filter function must call the File Manager's
FSpGetFileInfo
function on each file that is passed to it to determine its actual file type. If the File System parameter block pointer passed to your file filter function indicates that the file type is'MooV'
, and the actual type returned byFSpGetFileInfo
is not'MooV'
, then the file filter function will convert this file. If you do not wish a file to be displayed as a candidate for conversion, your file filter function should return a value oftrue
when it is called for that file.See "File Filter Functions" beginning on page 2-338 for comprehensive details on the interaction of application-defined file filter functions with the file preview display functions. For information of
FSpGetFileInfo
, see Inside Macintosh: Files.
- Note
- The functions described in this section do not appear in the MPW interface file
Movies.h
; rather, they are listed inImageCompression.h
.![]()